<!-- 入驻列表 -->
<style>
        th {
            text-align: center;
        }
    
        .table>tbody>tr>td {
            line-height: 60px;
            text-align: center;
            height: 50px;
            margin: 0px;
        }
    </style>
    <!-- css -->
    <link href="__PUBLIC__/ganged/Css/bootstrap.css" rel="stylesheet" type="text/css" />
    
    <div id="data_page" class="in_page">
        <table class="table table-striped table-bordered table-condensed ">
            <thead>
                <tr>
                    <th>店铺</th>
                    <th>销售清单</th>
                    <th>月总销售额</th>
                    <th>商品月总销售额</th>
                    <th>配置明细</th>
                    <th>净利</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <volist name="list" id="li">
                    <tr>
                        <td>{$li.shop_name}</td>
                        <td>{$li.month_sales}</td>
                        <td>{$li.month_total_sales}</td>
                        <td>{$li.goods_month_sales}</td>
                        <td>{$li.spare_parts}</td>
                        <td>{$li.net_profit}</td>
                        <td>
                            <a href="{:U('daily_sales', ['id'=>$li['id']])}">
                                <button type="button" class="btn btn-sm btn-primary">日销售额</button>
                            </a>
                            <a href="{:U('edit',array('id'=>$li['id']))}">
                                <button type="button" class="btn btn-sm btn-success">修改</button>
                            </a>
                            <button type="button" class="btn btn-sm btn-danger del" d_id="{$li.id}">删除</button>
                        </td>
                    </tr>
                </volist>
            </tbody>
        </table>
    </div>
    <div>{$page}</div>
    
    <style>
        #img {
            width: 700px;
            height: 550px;
            position: absolute;
            top: 5%;
            left: 20%;
            background-color: #FFFFFF;
            border-radius: 10px;
            box-shadow: 10px 10px 10px 5px #888888;
        }
    
        #order {
            width: 100px;
            height: 20px;
            display: block;
        }
    
        #Stick {
            width: 500px;
            height: 300px;
            position: absolute;
            top: 5%;
            left: 20%;
            background-color: #FFFFFF;
            border-radius: 10px;
            box-shadow: 10px 10px 10px 5px #888888;
        }
    
        #tuichu {
            position: absolute;
            right: 0px;
            bottom: 0px;
        }
    </style>
    <script>
        $(function () {
            //删除店铺
            $(".del").click(function (obj) {
                $_this = $(this);
                var id = $(this).attr("d_id");
                if (confirm("您确认删除吗?")) {
                    $.post("{:U('del')}", { 'id': id }, function (obj) {
                        alert(obj.m);
                        if (obj.s) {
                            $_this.parent().parent().remove();
                            // if(typeof(obj.url) != undefined && obj.url){
                            //     location.href = obj.url;
                            // }
                        }
                    })
                }
                return false;
            })
            $(".ajax-post").click(function (t) {
                var $this = $(t);
                var url = $this.attr('href');
                if ($this.hasClass('confirm')) {
                    if (confirm($this.data('original-title'))) {
    
                    }
                } else {
                    $.post(url, {}, function (obj) {
                        if (obj.status) {
                            if (typeof (obj.url) != 'undefined' && obj.url) {
                                location.href = obj.url;
                            }
                        } else {
                            alert(obj.info);
                        }
                    })
                }
                return false;
            })
        })
    </script>